/*
 * Copyright (c) 2007
 *	Alberto Magni, Maggioni Marcello
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */
package beans;
import org.apache.tomcat.util.http.fileupload.FileItem;
/**This bean stores the parametesr of the mail to be sent.
 * @author Alberto Magni*/
public class UserDataBean
{
    private String text=null;
    private String [] recipients = null;
    private String subject = null;
    private String password=null;
    private FileItem [] items=null;
    private String text_type=null;
    private String username=null;
    private String from=null;
    //------------------------------------------------------------------------------
    /**Returns the list of the mail recipients
     * @return the list of the mail recipients*/
    public String [] getRecipients()
    {
        return recipients;
    }
//------------------------------------------------------------------------------
    /**Returns the username of the user currently logged in
     * @return the username of the logged in user*/
    public String getUserName()
    {
        return username;
    }
//------------------------------------------------------------------------------
    /**Returns the subject of the mail.
     * @return the subject of the mail*/
    public String getSubject()
    {
        return subject;
    }
//------------------------------------------------------------------------------
    /**Returns the password of the mail server.
     * @return the password of the mail server*/
    public String getPassword()
    {
        return password;
    }
//------------------------------------------------------------------------------
    /**Reurns the text of the mail.
     * @return the text of the mail*/
    public String getText()
    {
        return text;
    }
//------------------------------------------------------------------------------
    /**Returns the mail address of the sender.
     * @return the address of the sender*/
    public String getFrom()
    {
        return from;
    }
//------------------------------------------------------------------------------
    /**Returns the test type that has to be sent.
     * @return the type of the text that is going to be sent*/
    public String getTextType()
    {
        return text_type;
    }
//------------------------------------------------------------------------------
    /**Returns the list of the attachments.
     * @return the list of the attachments*/
    public FileItem [] getItems()
    {
        return items;
    }
//------------------------------------------------------------------------------
    /**Set the username of the sender.
     * @param username the logged in sender*/
    public void setUserName(String username)
    {
        this.username=username;
    }
//------------------------------------------------------------------------------
    /**Set the mail text.
     * @param text the text of the mail*/
    public void setText(String text)
    {
        this.text=text;
    }
//------------------------------------------------------------------------------
    /**Set the recipients of the list.
     * @param recipients the list of the recipients of the mail*/
    public void setRecipients(String[] recipients)
    {
        //recipients=null;
        this.recipients=recipients;
    }
//------------------------------------------------------------------------------
    /**Set the subject of the mail.
     * @param subject the subject of the mail*/
    public void setSubject(String subject)
    {
        this.subject=subject;
    }
//------------------------------------------------------------------------------
    /**Set the password of the mail server.
     * @param password the password of the mail-server from which the mail has to be sent*/
    public void setPassword(String password)
    {
        this.password=password;
    }
 //------------------------------------------------------------------------------
    /**Set the attachments.
     * @param items the list of the attachments*/
    public void setItems(FileItem [] items)
    {
        this.items=items;
    }
//------------------------------------------------------------------------------
    /**Set the type of the text to be sent.
     * @param type the type of the text that is going to be sent*/
    public void setTextType(String type)
    {
        this.text_type=type;
    }
//------------------------------------------------------------------------------
    /**The address of the mail sender.
     * @param from the address of the sender of the mail*/
    public void setFrom(String from)
    {
        this.from=from;
    }
}
